﻿using System.Web.Mvc;
using ValidationSample.Models;

namespace ValidationSample.Controllers
{
    [HandleError]
    public class AccountController : Controller
    {
        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult CheckLoginName(string loginName)
        {
            bool valid = new LoginNameValidator().IsValid(loginName);
            return Content(valid.ToString().ToLowerInvariant());
        }
    }
}
